package com.fangcun.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fangcun.bean.admin.goods.GoodsResponse;
import com.fangcun.bean.api.goods.request.GoodsSearchRequest;
import com.fangcun.bean.api.goods.response.GoodsDetailResponse;
import com.fangcun.bean.api.goods.response.GoodsSearchResponse;
import com.fangcun.entity.Goods;

public interface GoodsMapper {

	int deleteByPrimaryKey(Long id);

	int insert(Goods record);

	int insertSelective(Goods record);

	Goods selectByPrimaryKey(Long id);

	int updateByPrimaryKeySelective(Goods record);

	int updateByPrimaryKey(Goods record);

	// ----------------------------前端访问---------------------------------------

	List<GoodsSearchResponse> listForApi(GoodsSearchRequest request);

	GoodsDetailResponse detailForApi(@Param("priceId") Long priceId, @Param("userId") Long userId);
	
	// ----------------------------后端访问---------------------------------------
	com.fangcun.bean.admin.goods.response.GoodsDetailResponse detailForAdmin(Long id);
	
	List<GoodsResponse> listForAdmin(Goods request);
	
	List<Goods> getNewGoodsList(Goods request);
}